﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminSite.master" AutoEventWireup="true"
    CodeFile="Articles.aspx.cs" Inherits="Admin_Articles" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script type="text/javascript">
        function DeleteArticles (ArticlesID) {
            var r = confirm("Are you sure you want delete this Articles?")
            if (r == true) {
                DeleteArticlesMethods(ArticlesID);
            } 
        }
        function DeleteArticlesMethods(ArticlesID) {
            PageMethods.DeleteArticlesInfo(ArticlesID, OnDeleteArticlesSucceeded, OnDeleteArticlesFaild);
        }
        function OnDeleteArticlesSucceeded(result) {
            if (result == "true") {
                $("#" + '<%= lbtnRefreshGV.ClientID %>').trigger('click');
                $("#message-green").css("display", "");
                $("#message_4").html("Delete Articles successfully");
            }
            else {
                $("#" + '<%= lbtnRefreshGV.ClientID %>').trigger('click');
                $("#message-green").css("display", "");
                $("#message_4").html("Delete Articles successfully");
            }
        }
        function OnDeleteArticlesFaild(result) {
            alert("Error");
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner ...................................................................... START -->
                <div id="content-table-inner">
                    <!--  start table-content  -->
                    <div id="table-content">
                        <input type="button" value="Add News Articles" class="btnClass" style="width: 150px;"
                            onclick="window.location='AddArticls'" />

                        <asp:Button ID="btnRSSFeedsGeneraters" runat="server" Text="Generate RSS Feeds" 
                            onclick="btnRSSFeedsGeneraters_Click" Width="150" />

                        <asp:Button ID="btnPingGoogleSiteMap" runat="server" Text="Ping Google Sitemap" 
                             Width="150" onclick="btnPingGoogleSiteMap_Click" />
						
						<a href="http://ping.feedcat.net/361911-851850-130807" TARGET="_blank" style="text-decoration:underline;background-color:blue;color:#fff;">To Refrech XML Feeds</a>
						
                        <div style="height: 20px; clear: both;">
                        </div>
                        <!--  start product-table ..................................................................................... -->
                        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                            <asp:Repeater runat="server" ID="rptManageCategory">
                                <HeaderTemplate>
                                    <th align="center" class="table-header-repeat line-left">
                                        <a href="">Category Name</a>
                                    </th>
                                    <th class="table-header-repeat line-left minwidth-1">
                                        <a href="">Articls Title</a>
                                    </th>
                                    <th class="table-header-repeat line-left">
                                        <a href="">Articls Small Description</a>
                                    </th>
                                    <th class="table-header-repeat line-left">
                                        <a href="">Articls Counter</a>
                                    </th> 
                                    <th align="center" class="table-header-repeat line-left">
                                        <a href="">Create Date</a>
                                    </th>
                                    <th class="table-header-options line-left">
                                        <a href="">Options</a>
                                    </th>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr>
                                        <td align="center">
                                            <%# CheckCategoryID(DataBinder.Eval(Container.DataItem, "Category_ID").ToString())%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "Articls_Title")%>
                                        </td>
                                        <td title='<%# DataBinder.Eval(Container.DataItem, "Articls_SmallDescription").ToString()%>'>
                                            <%# SplitString(DataBinder.Eval(Container.DataItem, "Articls_SmallDescription").ToString())%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "Articls_Counter")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "Articls_CreateDate ")%>
                                        </td>
                                        <td class="options-width">
                                            <a href='AddArticls?ArticlesID=<%# DataBinder.Eval(Container.DataItem,"Articls_ID") %>' title="Edit" class="icon-1 info-tooltip"'></a>
                                            <a href='javascript:void(0)' onclick="DeleteArticles(<%# DataBinder.Eval(Container.DataItem,"Articls_ID") %>)" title="Delete" class="icon-2 info-tooltip"></a>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                                <AlternatingItemTemplate>
                                    <tr class="alternate-row">
                                                                                 <td align="center">
                                            <%# CheckCategoryID(DataBinder.Eval(Container.DataItem, "Category_ID").ToString())%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "Articls_Title")%>
                                        </td>
                                       <td title='<%# DataBinder.Eval(Container.DataItem, "Articls_SmallDescription").ToString()%>'>
                                            <%# SplitString(DataBinder.Eval(Container.DataItem, "Articls_SmallDescription").ToString())%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "Articls_Counter")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "Articls_CreateDate")%>
                                        </td>
                                        <td class="options-width">
                                            <a href='AddArticls?ArticlesID=<%# DataBinder.Eval(Container.DataItem,"Articls_ID") %>' title="Edit" class="icon-1 info-tooltip"'></a>
                                            <a href='javascript:void(0)' onclick="DeleteArticles(<%# DataBinder.Eval(Container.DataItem,"Articls_ID") %>)" title="Delete" class="icon-2 info-tooltip"></a>
                                        </td>
                                    </tr>
                                </AlternatingItemTemplate>
                            </asp:Repeater>
                        </table>
                        <!--  end product-table................................... -->
                    </div>
                    <!--  end content-table  -->
                    <div class="clear">
                    </div>
                </div>
                <!--  end content-table-inner ............................................END  -->
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
    </table>
    <asp:Button ID="lbtnRefreshGV" CssClass="ClassHideDiv" runat="server" Text="" Height="0px"
        Width="0px" Style="visibility: hidden" OnClick="lbtnRefreshGV_Click"></asp:Button>
</asp:Content>
